package luj.game.robot.internal.dynamic.combine;

import com.google.common.collect.ImmutableList;
import luj.game.robot.api.network.http.RobotHttpHandler;
import luj.game.robot.api.network.http.RobotHttpMeta;
import luj.game.robot.api.network.http.RobotHttpModule;
import luj.game.robot.internal.dynamic.init.DynamicInitInvoker;
import luj.game.robot.internal.session.inject.StaticBeanCollector;

import java.util.List;

final class RHttpImpl implements AllBeanCombiner.Http {
  @Override
  public List<RobotHttpHandler> handler() {
    return ImmutableList.<RobotHttpHandler>builder()
//        .addAll(_staticRoot.protoHandler())
        .addAll(_dynamicRoot.httpHandler())
        .build();
  }

  @Override
  public List<RobotHttpMeta> meta() {
    return ImmutableList.<RobotHttpMeta>builder()
//        .addAll(_staticRoot.protoHandler())
        .addAll(_dynamicRoot.httpMeta())
        .build();
  }


  @Override
  public List<RobotHttpModule> module() {
    return ImmutableList.<RobotHttpModule>builder()
//        .addAll(_staticRoot.protoHandler())
        .addAll(_dynamicRoot.httpModule())
        .build();
  }

  StaticBeanCollector.Result _staticRoot;

  DynamicInitInvoker.Result _dynamicRoot;
}
